package com.ps.weedingjumper;

import com.badlogic.gdx.Screen;
import com.ps.weedingjumper.controller.WorldController;
import com.ps.weedingjumper.view.PlayerView;
import com.ps.weedingjumper.view.WorldView;

public class GameScreen implements Screen {	
	
	private WorldController worldController;
	private WorldView worldView;
	private PlayerView playerView;
	
	@Override
	public void render(float delta) {
		worldController.update(delta);
		worldView.update();
		worldView.render();
		playerView.render();
	}

	@Override
	public void resize(int width, int height) {
		worldView.resize(width, height);
		worldController.resize();
	}

	@Override
	public void show() {
		worldController = new WorldController();
		worldView = worldController.getWorldView();
		playerView = worldController.getPlayerView();
	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub

	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub

	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		worldView.dispose();
	}

}
